package com.ruoyi.domain.traceability;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 追溯详情对象 mes_traceability_detail
 * 
 * @author ruoyi
 * @date 2025-01-01
 */
@Data
public class MesTraceabilityDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 详情ID */
    private Long detailId;

    /** 追溯记录ID */
    @Excel(name = "追溯记录ID")
    private Long traceId;

    /** 节点类型（PRODUCTION生产 QUALITY质检 INVENTORY库存 MATERIAL物料） */
    @Excel(name = "节点类型", readConverterExp = "PRODUCTION=生产,QUALITY=质检,INVENTORY=库存,MATERIAL=物料")
    private String nodeType;

    /** 节点ID */
    @Excel(name = "节点ID")
    private Long nodeId;

    /** 节点编码 */
    @Excel(name = "节点编码")
    private String nodeCode;

    /** 节点名称 */
    @Excel(name = "节点名称")
    private String nodeName;

    /** 父节点ID */
    @Excel(name = "父节点ID")
    private Long parentNodeId;

    /** 子节点ID列表 */
    private String childNodeIds;

    /** 节点层级 */
    @Excel(name = "节点层级")
    private Integer nodeLevel;

    /** 节点时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "节点时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date nodeTime;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private String operationType;

    /** 操作数量 */
    @Excel(name = "操作数量")
    private Integer quantity;

    /** 操作员 */
    @Excel(name = "操作员")
    private String operator;

    /** 质量状态 */
    @Excel(name = "质量状态")
    private String qualityStatus;

    /** 位置信息 */
    @Excel(name = "位置信息")
    private String location;

    /** 关联数据JSON */
    private String relatedData;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;
}